package com.mrinalwadhwa.effects
{
	import com.mrinalwadhwa.effects.effectClasses.BendPixelsInstance;
	
	import flash.utils.ByteArray;
	
	import mx.effects.IEffectInstance;
	import mx.effects.TweenEffect;

	public class BendPixels extends TweenEffect
	{
		
	    [Inspectable(category="General")]
		public var benderFileURL:String;
		
		
		[Inspectable(category="General")]
		public var benderParams:Array;

		[Inspectable(category="General")]
		public var benderByteArray:ByteArray;

		
		public function BendPixels(target:Object=null)
		{
			super(target);
			instanceClass = BendPixelsInstance;
		}


       override public function getAffectedProperties():Array {
           return [ "filters" ];
       }


       override protected function initInstance(inst:IEffectInstance):void {
           super.initInstance(inst);
           
           if(benderByteArray){
           		BendPixelsInstance(inst).benderByteArray = benderByteArray;
           }else if(benderFileURL){
	           		BendPixelsInstance(inst).benderFileURL = benderFileURL;
           }
           BendPixelsInstance(inst).benderParams = benderParams;
      
       } 

		
	}
}